# coding=utf-8
# -*- coding: UTF-8 -*-
#
# This file is part of the kernelstudio package.
#
# (c) 2014-2025 zlin <admin@kernelstudio.com>
#
# For the full copyright and license information, please view the LICENSE file
# that was distributed with this source code.
import os.path


def read_as_bytes(file_path: str) -> bytes:
    if not os.path.isfile(file_path):
        raise FileNotFoundError
    with open(file_path, 'rb') as f:
        raw_bytes = f.read()
    return raw_bytes
